1. Field of the Invention
The present disclosure relates to an imaging device such as a digital camera and a cellular phone.
2. Description of the Related Art
There have been proposed various methods for contactlessly measuring a depth of a three-dimensional scene, that is, a distance to each of subjects. The methods are roughly classified into active methods and passive methods. In the active methods, an infrared ray, an ultrasonic wave, a laser beam or the like is radiated onto the subject, and the distance is calculated based on a time taken until a reflected wave returns or an angle of the reflected wave. In the passive methods, the distance is calculated based on an image of the subject. Particularly in a camera, the passive methods, which do not require a device for radiating the infrared ray or the like, are widely used.
As one of the passive methods, a DFD (Depth from Defocus) method (hereinafter, referred to as DFD) is disclosed. The DFD measures the distance based on information regarding a blur in which a size and a shape are changed depending on a subject distance. The DFD has features that a plurality of cameras are not required, and that the distance can be measured from a small number of images. Processing for measuring the distance to the subject by using the DFD is referred to as DFD processing.
A description is briefly made below of a principle of the DFD. The DFD is a method of measuring the distance based on the blur information from a plurality of images having different focusing positions. Each of shot images including the blur becomes an image in which a point spread function that is a function of the subject distance is convolved with an all-focused image that shows a state where there is no blur by a lens. The point spread function is a function that uses the subject distance as a variable, and accordingly, the blur is detected from a blurred image in the DFD, whereby the subject distance can be obtained.
At this time, the all-focused image and the subject distance are unknown. One expression regarding the blurred image, the all-focused image, and the subject distance is established for one blurred image. A new expression is obtained when a blurred image having a different focusing position is newly shot. Accordingly, the subject distance is obtained by solving a plurality of obtained expressions. Regarding a method for acquiring the expressions, a method for solving the expressions, and the like, various methods including PTL 1, are disclosed.